cfa2aacedfe421b1eea3e07220b0d17cce8106e1,oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/cache/NodeDocumentCache.java,NodeDocumentCache,putNonConflictingDocs,#CacheChangesTracker#Iterable#,434

Before Change


            Lock lock = locks.acquire(id);
            try {
                // if an old document is present in the cache, we can simply update it
                if (getIfPresent(id) != null) {
                    putIfNewer(d);
                // if the document hasn't been invalidated or added during the tracker lifetime,
                // we can put it as well

After Change


            String id = d.getId();
            Lock lock = locks.acquire(id);
            try {
                NodeDocument cachedDoc = getIfPresent(id);
                // if an old document is present in the cache, we can simply update it
                if (cachedDoc != null && isNewer(cachedDoc, d)) {
                    putInternal(d);
                // if the document hasn't been invalidated or added during the tracker lifetime,
                // we can put it as well